import type { GeneratedEtsLibFile } from "../../types/generated";

export const FILE: GeneratedEtsLibFile = {
  path: 'ets/api/@ohos.data.preferences.d.ts',
  content: "/*\n * Copyright (c) 2022 Huawei Device Co., Ltd.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file\n * @kit ArkData\n */\nimport { AsyncCallback, Callback } from './@ohos.base';\nimport Context from './application/BaseContext';\n/**\n * Provides interfaces to obtain and modify preferences data.\n *\n * @namespace preferences\n * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n * @since 9\n * @name preferences\n */\n/**\n * Provides interfaces to obtain and modify preferences data.\n *\n * @namespace preferences\n * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n * @crossplatform\n * @since 10\n * @name preferences\n */\n/**\n * Provides interfaces to obtain and modify preferences data.\n *\n * @namespace preferences\n * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n * @crossplatform\n * @atomicservice\n * @since 11\n * @name preferences\n */\ndeclare namespace preferences {\n    /**\n     * Indicates possible value types\n     *\n     * @typedef {number | string | boolean | Array<number> | Array<string> | Array<boolean>}\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Indicates possible value types\n     *\n     * @typedef {number | string | boolean | Array<number> | Array<string> | Array<boolean>}\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 10\n     */\n    /**\n     * Indicates possible value types\n     *\n     * @typedef {number | string | boolean | Array<number> | Array<string> | Array<boolean> | Uint8Array}\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Indicates possible value types\n     *\n     * @typedef {number | string | boolean | Array<number> | Array<string> | Array<boolean> | Uint8Array | object |\n     * bigint}\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @atomicservice\n     * @since 12\n     */\n    type ValueType = number | string | boolean | Array<number> | Array<string> | Array<boolean> | Uint8Array | object | bigint;\n    /**\n     * Indicates the maximum length of a key (80 characters).\n     *\n     * @constant\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Indicates the maximum length of a key (80 characters).\n     *\n     * @constant\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Indicates the maximum length of a key (80 characters).\n     *\n     * @constant\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Maximum length of a key.\n     *\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    const MAX_KEY_LENGTH: number;\n    /**\n     * Indicates the maximum length of a string (8192 characters).\n     *\n     * @constant\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Indicates the maximum length of a string (8192 characters).\n     *\n     * @constant\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Indicates the maximum length of a string (8192 characters).\n     *\n     * @constant\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Maximum length of a value.\n     *\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    const MAX_VALUE_LENGTH: number;\n    /**\n     * the storage type\n     *\n     * @enum { number }\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @atomicservice\n     * @since 18\n     */\n    enum StorageType {\n        /**\n         * XML storage type\n         *\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @atomicservice\n         * @since 18\n         */\n        XML = 0,\n        /**\n         * GSKV storage type\n         *\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @atomicservice\n         * @since 18\n         */\n        GSKV\n    }\n    /**\n     * Manages preferences file configurations.\n     *\n     * @interface Options\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Manages preferences file configurations.\n     *\n     * @interface Options\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    interface Options {\n        /**\n         * The preferences file name.\n         *\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * The preferences file name.\n         *\n         * @type { string }\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        name: string;\n        /**\n         * Application Group Id.\n         *\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @StageModelOnly\n         * @since 10\n         */\n        /**\n         * Application Group Id.\n         *\n         * @type { ?(string | null | undefined) }\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @StageModelOnly\n         * @atomicservice\n         * @since 11\n         */\n        dataGroupId?: string | null | undefined;\n        /**\n         * The preferences storage type.\n         *\n         * @type { ?(StorageType | null | undefined) }\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @atomicservice\n         * @since 18\n         */\n        storageType?: StorageType | null | undefined;\n    }\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @param { AsyncCallback<Preferences> } callback - The {@link Preferences} instance matching the specified\n     * preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @param { AsyncCallback<Preferences> } callback - The {@link Preferences} instance matching the specified\n     * preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @param { AsyncCallback<Preferences> } callback - The {@link Preferences} instance matching the specified\n     * preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function getPreferences(context: Context, name: string, callback: AsyncCallback<Preferences>): void;\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @param { AsyncCallback<Preferences> } callback - The {@link Preferences} instance matching the specified\n     * preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @param { AsyncCallback<Preferences> } callback - The {@link Preferences} instance matching the specified\n     * preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function getPreferences(context: Context, options: Options, callback: AsyncCallback<Preferences>): void;\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @returns { Promise<Preferences> } The {@link Preferences} instance matching the specified preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @returns { Promise<Preferences> } The {@link Preferences} instance matching the specified preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @returns { Promise<Preferences> } The {@link Preferences} instance matching the specified preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function getPreferences(context: Context, name: string): Promise<Preferences>;\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @returns { Promise<Preferences> } The {@link Preferences} instance matching the specified preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @returns { Promise<Preferences> } The {@link Preferences} instance matching the specified preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function getPreferences(context: Context, options: Options): Promise<Preferences>;\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * This interface is executed synchronously.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @returns { Preferences } The {@link Preferences} instance matching the specified preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Obtains a {@link Preferences} instance matching a specified preferences file name.\n     * This interface is executed synchronously.\n     * <p>The {@link references} instance loads all data of the preferences file and\n     * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @returns { Preferences } The {@link Preferences} instance matching the specified preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function getPreferencesSync(context: Context, options: Options): Preferences;\n    /**\n     * check the {@link StorageType} type is supported or not on current system.\n     * @param { StorageType } type - Indicates storage type which want to check.\n     * @returns { boolean } a boolean value indicates this system support the type or not.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @atomicservice\n     * @since 18\n     */\n    function isStorageTypeSupported(type: StorageType): boolean;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function deletePreferences(context: Context, name: string, callback: AsyncCallback<void>): void;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function deletePreferences(context: Context, options: Options, callback: AsyncCallback<void>): void;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function deletePreferences(context: Context, name: string): Promise<void>;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache which is performed by removePreferencesFromCache and deletes the\n     * preferences file.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function deletePreferences(context: Context, options: Options): Promise<void>;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback<void>): void;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @param { AsyncCallback<void> } callback - Indicates the callback function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function removePreferencesFromCache(context: Context, options: Options, callback: AsyncCallback<void>): void;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function removePreferencesFromCache(context: Context, name: string): Promise<void>;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @returns { Promise<void> } A promise object.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function removePreferencesFromCache(context: Context, options: Options): Promise<void>;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache. This interface is executed synchronously.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache. This interface is executed synchronously.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { string } name - Indicates the preferences file name.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function removePreferencesFromCacheSync(context: Context, name: string): void;\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache. This interface is executed synchronously.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Deletes a {@link Preferences} instance matching a specified preferences file name\n     * from the cache. This interface is executed synchronously.\n     * <p>When deleting the {@link Preferences} instance, you must release all references\n     * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency\n     * will occur.\n     *\n     * @param { Context } context - Indicates the context of application or capability.\n     * @param { Options } options - Indicates the {@link Options} option of preferences file position.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 15500000 - Inner error.\n     * @throws { BusinessError } 15501001 - The operations is supported in stage mode only.\n     * @throws { BusinessError } 15501002 - Invalid dataGroupId.\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function removePreferencesFromCacheSync(context: Context, options: Options): void;\n    /**\n     * Provides interfaces to obtain and modify preferences data.\n     * <p>The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory.\n     * You can use getPreferences to obtain the {@link Preferences} instance matching\n     * the file that stores preferences data, and use movePreferencesFromCache\n     * to remove the {@link Preferences} instance from the memory.\n     *\n     * @interface Preferences\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @since 9\n     */\n    /**\n     * Provides interfaces to obtain and modify preferences data.\n     * <p>The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory.\n     * You can use getPreferences to obtain the {@link Preferences} instance matching\n     * the file that stores preferences data, and use movePreferencesFromCache\n     * to remove the {@link Preferences} instance from the memory.\n     *\n     * @interface Preferences\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Provides interfaces to obtain and modify preferences data.\n     * <p>The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory.\n     * You can use getPreferences to obtain the {@link Preferences} instance matching\n     * the file that stores preferences data, and use movePreferencesFromCache\n     * to remove the {@link Preferences} instance from the memory.\n     *\n     * @interface Preferences\n     * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    interface Preferences {\n        /**\n         * Obtains the value of a preferences in the ValueType format.\n         * <p>If the value is {@code null} or not in the ValueType format, the default value is returned.\n         *\n         * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } defValue - Indicates the default value to return.\n         * @param { AsyncCallback<ValueType> } callback - The value matching the specified key if it is found;\n         * returns the default value otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Obtains the value of a preferences in the ValueType format.\n         * <p>If the value is {@code null} or not in the ValueType format, the default value is returned.\n         *\n         * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } defValue - Indicates the default value to return.\n         * @param { AsyncCallback<ValueType> } callback - The value matching the specified key if it is found;\n         * returns the default value otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Obtains the value of a preferences in the ValueType format.\n         * <p>If the value is {@code null} or not in the ValueType format, the default value is returned.\n         *\n         * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } defValue - Indicates the default value to return.\n         * @param { AsyncCallback<ValueType> } callback - The value matching the specified key if it is found;\n         * returns the default value otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        get(key: string, defValue: ValueType, callback: AsyncCallback<ValueType>): void;\n        /**\n         * Obtains the value of a preferences in the ValueType format.\n         * <p>If the value is {@code null} or not in the ValueType format, the default value is returned.\n         *\n         * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } defValue - Indicates the default value to return.\n         * @returns { Promise<ValueType> } The value matching the specified key if it is found;\n         * returns the default value otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Obtains the value of a preferences in the ValueType format.\n         * <p>If the value is {@code null} or not in the ValueType format, the default value is returned.\n         *\n         * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } defValue - Indicates the default value to return.\n         * @returns { Promise<ValueType> } The value matching the specified key if it is found;\n         * returns the default value otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Obtains the value of a preferences in the ValueType format.\n         * <p>If the value is {@code null} or not in the ValueType format, the default value is returned.\n         *\n         * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } defValue - Indicates the default value to return.\n         * @returns { Promise<ValueType> } The value matching the specified key if it is found;\n         * returns the default value otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        get(key: string, defValue: ValueType): Promise<ValueType>;\n        /**\n         * Obtains the value of a preferences in the ValueType format. This interface is executed synchronously.\n         * <p>If the value is {@code null} or not in the ValueType format, the default value is returned.\n         *\n         * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } defValue - Indicates the default value to return.\n         * @returns { ValueType } The value matching the specified key if it is found;\n         * returns the default value otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Obtains the value of a preferences in the ValueType format. This interface is executed synchronously.\n         * <p>If the value is {@code null} or not in the ValueType format, the default value is returned.\n         *\n         * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } defValue - Indicates the default value to return.\n         * @returns { ValueType } The value matching the specified key if it is found;\n         * returns the default value otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        getSync(key: string, defValue: ValueType): ValueType;\n        /**\n         * Obtains all the keys and values of a preferences in an object.\n         *\n         * @param { AsyncCallback<Object> } callback - The values and keys in an object.\n         * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Obtains all the keys and values of a preferences in an object.\n         *\n         * @param { AsyncCallback<Object> } callback - The values and keys in an object.\n         * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Obtains all the keys and values of a preferences in an object.\n         *\n         * @param { AsyncCallback<Object> } callback - The values and keys in an object.\n         * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        getAll(callback: AsyncCallback<Object>): void;\n        /**\n         * Obtains all the keys and values of a preferences in an object.\n         *\n         * @returns { Promise<Object> } The values and keys in an object.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Obtains all the keys and values of a preferences in an object.\n         *\n         * @returns { Promise<Object> } The values and keys in an object.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Obtains all the keys and values of a preferences in an object.\n         *\n         * @returns { Promise<Object> } The values and keys in an object.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        getAll(): Promise<Object>;\n        /**\n         * Obtains all the keys and values of a preferences in an object.  This interface\n         * is executed synchronously.\n         *\n         * @returns { Object } The values and keys in an object.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Obtains all the keys and values of a preferences in an object.  This interface\n         * is executed synchronously.\n         *\n         * @returns { Object } The values and keys in an object.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        getAllSync(): Object;\n        /**\n         * Checks whether the {@link Preferences} object contains a preferences matching a specified key.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { AsyncCallback<boolean> } callback - {@code true} if the {@link Preferences} object contains a\n         * preferences with the specified key;returns {@code false} otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Checks whether the {@link Preferences} object contains a preferences matching a specified key.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { AsyncCallback<boolean> } callback - {@code true} if the {@link Preferences} object contains a\n         * preferences with the specified key;returns {@code false} otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Checks whether the {@link Preferences} object contains a preferences matching a specified key.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { AsyncCallback<boolean> } callback - {@code true} if the {@link Preferences} object contains a\n         *  preferences with the specified key;returns {@code false} otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        has(key: string, callback: AsyncCallback<boolean>): void;\n        /**\n         * Checks whether the {@link Preferences} object contains a preferences matching a specified key.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @returns { Promise<boolean> } {@code true} if the {@link Preferences} object contains\n         * a preferences with the specified key; returns {@code false} otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Checks whether the {@link Preferences} object contains a preferences matching a specified key.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @returns { Promise<boolean> } {@code true} if the {@link Preferences} object contains\n         * a preferences with the specified key; returns {@code false} otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Checks whether the {@link Preferences} object contains a preferences matching a specified key.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @returns { Promise<boolean> } {@code true} if the {@link Preferences} object contains\n         * a preferences with the specified key; returns {@code false} otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        has(key: string): Promise<boolean>;\n        /**\n         * Checks whether the {@link Preferences} object contains a preferences matching a specified key. This interface\n         * is executed synchronously.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @returns { boolean } {@code true} if the {@link Preferences} object contains\n         * a preferences with the specified key; returns {@code false} otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Checks whether the {@link Preferences} object contains a preferences matching a specified key. This interface\n         * is executed synchronously.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @returns { boolean } {@code true} if the {@link Preferences} object contains\n         * a preferences with the specified key; returns {@code false} otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        hasSync(key: string): boolean;\n        /**\n         * Sets an int value for the key in the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the\n         * file.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } value - Indicates the value of the preferences.\n         * <tt>MAX_VALUE_LENGTH</tt>.\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Sets an int value for the key in the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the\n         * file.\n         * <p>When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage.\n         * Otherwise, the format of the persistent file is incorrect and the file is damaged.\n         * <p>If the corresponding key already exists, the {@link put} method will overwrite its value.\n         * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } value - Indicates the value of the preferences.\n         * <tt>MAX_VALUE_LENGTH</tt>.\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Sets an int value for the key in the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the\n         * file.\n         * <p>When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage.\n         * Otherwise, the format of the persistent file is incorrect and the file is damaged.\n         * <p>If the corresponding key already exists, the {@link put} method will overwrite its value.\n         * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } value - Indicates the value of the preferences.\n         * <tt>MAX_VALUE_LENGTH</tt>.\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        put(key: string, value: ValueType, callback: AsyncCallback<void>): void;\n        /**\n         * Sets an int value for the key in the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the\n         * file.\n         * <p>When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage.\n         * Otherwise, the format of the persistent file is incorrect and the file is damaged.\n         * <p>If the corresponding key already exists, the {@link put} method will overwrite its value.\n         * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } value - Indicates the value of the preferences.\n         * <tt>MAX_VALUE_LENGTH</tt>.\n         * @returns { Promise<void> } A promise object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Sets an int value for the key in the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the\n         * file.\n         * <p>When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage.\n         * Otherwise, the format of the persistent file is incorrect and the file is damaged.\n         * <p>If the corresponding key already exists, the {@link put} method will overwrite its value.\n         * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } value - Indicates the value of the preferences.\n         * <tt>MAX_VALUE_LENGTH</tt>.\n         * @returns { Promise<void> } A promise object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Sets an int value for the key in the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the\n         * file.\n         * <p>When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage.\n         * Otherwise, the format of the persistent file is incorrect and the file is damaged.\n         * <p>If the corresponding key already exists, the {@link put} method will overwrite its value.\n         * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } value - Indicates the value of the preferences.\n         * <tt>MAX_VALUE_LENGTH</tt>.\n         * @returns { Promise<void> } A promise object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        put(key: string, value: ValueType): Promise<void>;\n        /**\n         * Sets an int value for the key in the {@link Preferences} object. This interface is executed synchronously.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the\n         * file.\n         * <p>When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage.\n         * Otherwise, the format of the persistent file is incorrect and the file is damaged.\n         * <p>If the corresponding key already exists, the {@link put} method will overwrite its value.\n         * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } value - Indicates the value of the preferences.\n         * <tt>MAX_VALUE_LENGTH</tt>.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Sets an int value for the key in the {@link Preferences} object. This interface is executed synchronously.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the\n         * file.\n         * <p>When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage.\n         * Otherwise, the format of the persistent file is incorrect and the file is damaged.\n         * <p>If the corresponding key already exists, the {@link put} method will overwrite its value.\n         * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists.\n         *\n         * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { ValueType } value - Indicates the value of the preferences.\n         * <tt>MAX_VALUE_LENGTH</tt>.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        putSync(key: string, value: ValueType): void;\n        /**\n         * Deletes the preferences with a specified key from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Deletes the preferences with a specified key from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Deletes the preferences with a specified key from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        delete(key: string, callback: AsyncCallback<void>): void;\n        /**\n         * Deletes the preferences with a specified key from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @returns { Promise<void> } A promise object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Deletes the preferences with a specified key from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @returns { Promise<void> } A promise object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Deletes the preferences with a specified key from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @returns { Promise<void> } A promise object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        delete(key: string): Promise<void>;\n        /**\n         * Deletes the preferences with a specified key from the {@link Preferences} object. This interface is\n         * executed synchronously. <p>You can call the {@link #flush} method to save the {@link Preferences}\n         * object to the file.\n         *\n         * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Deletes the preferences with a specified key from the {@link Preferences} object. This interface is\n         * executed synchronously. <p>You can call the {@link #flush} method to save the {@link Preferences}\n         * object to the file.\n         *\n         * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty.\n         * <tt>MAX_KEY_LENGTH</tt>.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        deleteSync(key: string): void;\n        /**\n         * Clears all preferences from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Clears all preferences from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Clears all preferences from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        clear(callback: AsyncCallback<void>): void;\n        /**\n         * Clears all preferences from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @returns { Promise<void> } A promise object.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Clears all preferences from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @returns { Promise<void> } A promise object.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Clears all preferences from the {@link Preferences} object.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @returns { Promise<void> } A promise object.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        clear(): Promise<void>;\n        /**\n         * Clears all preferences from the {@link Preferences} object. This interface is executed synchronously.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Clears all preferences from the {@link Preferences} object. This interface is executed synchronously.\n         * <p>You can call the {@link #flush} method to save the {@link Preferences} object to the file.\n         *\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        clearSync(): void;\n        /**\n         * Asynchronously saves the {@link Preferences} object to the file.\n         *\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified;\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Asynchronously saves the {@link Preferences} object to the file.\n         *\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified;\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Asynchronously saves the {@link Preferences} object to the file.\n         *\n         * @param { AsyncCallback<void> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        flush(callback: AsyncCallback<void>): void;\n        /**\n         * Asynchronously saves the {@link Preferences} object to the file.\n         *\n         * @returns { Promise<void> } A promise object.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Asynchronously saves the {@link Preferences} object to the file.\n         *\n         * @returns { Promise<void> } A promise object.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Asynchronously saves the {@link Preferences} object to the file.\n         *\n         * @returns { Promise<void> } A promise object.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        flush(): Promise<void>;\n        /**\n         * Saves the {@link Preferences} object to the file.\n         *\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        flushSync(): void;\n        /**\n         * Registers an observer to listen for the change of a {@link Preferences} object.\n         *\n         * @param { 'change' } type - Indicates the callback when preferences changes.\n         * @param { Callback<{ key: string }> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Registers an observer to listen for the change of a {@link Preferences} object.\n         *\n         * @param { 'change' } type - Indicates the callback when preferences changes.\n         * @param { Function } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Registers an observer to listen for the change of a {@link Preferences} object.\n         *\n         * @param { 'change' } type - Indicates the callback when preferences changes.\n         * @param { Callback<string> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        on(type: 'change', callback: Callback<string>): void;\n        /**\n         * Registers an observer to listen for the change of a {@link Preferences} object.\n         *\n         * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes.\n         * @param { Function } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500019 - Failed to obtain the subscription service.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 10\n         */\n        /**\n         * Registers an observer to listen for the change of a {@link Preferences} object.\n         *\n         * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes.\n         * @param { Callback<string> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @throws { BusinessError } 15500019 - Failed to obtain the subscription service.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @atomicservice\n         * @since 11\n         */\n        on(type: 'multiProcessChange', callback: Callback<string>): void;\n        /**\n         * Registers an observer to listen for changes to the {@ link Preferences} object.\n         *\n         * @param { 'dataChange' } type - Indicates the type of the event to observe.\n         * @param { Array<string> } keys - Indicates one or more keys to listen for.\n         * @param { Callback<Record<string, ValueType>> } callback - Indicates the callback used to return the data change.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'dataChange', keys: Array<string>, callback: Callback<Record<string, ValueType>>): void;\n        /**\n         * Unregisters an existing observer.\n         *\n         * @param { 'change' } type - Indicates the callback when preferences changes.\n         * @param { Callback<{ key: string }> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 9\n         */\n        /**\n         * Unregisters an existing observer.\n         *\n         * @param { 'change' } type - Indicates the callback when preferences changes.\n         * @param { Function } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Unregisters an existing observer.\n         *\n         * @param { 'change' } type - Indicates the callback when preferences changes.\n         * @param { Callback<string> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        off(type: 'change', callback?: Callback<string>): void;\n        /**\n         * Unregisters an existing observer.\n         *\n         * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes.\n         * @param { Function } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @since 10\n         */\n        /**\n         * Unregisters an existing observer.\n         *\n         * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes.\n         * @param { Callback<string> } callback - Indicates the callback function.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @atomicservice\n         * @since 11\n         */\n        off(type: 'multiProcessChange', callback?: Callback<string>): void;\n        /**\n         * Unregisters an observer for changes to the {@ link Preferences} object.\n         *\n         * @param { 'dataChange' } type - Indicates the event type.\n         * @param { Array<string> } keys - Indicates the data whose changes are not observed.\n         * @param { Callback<Record<string, ValueType>> } callback - Indicates the callback to unregister.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 15500000 - Inner error.\n         * @syscap SystemCapability.DistributedDataManager.Preferences.Core\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'dataChange', keys: Array<string>, callback?: Callback<Record<string, ValueType>>): void;\n    }\n}\nexport default preferences;\n",
}
export default FILE;